package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 搜索历史对象 spff_search_history
 * 
 * @author xjj
 * @date 2025-01-28
 */
public class SpffSearchHistory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 搜索历史ID */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 搜索关键词 */
    @Excel(name = "搜索关键词")
    private String keyword;

    /** 搜索结果数量 */
    @Excel(name = "搜索结果数量")
    private Integer resultCount;

    /** 搜索时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "搜索时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date searchTime;

    /** IP地址 */
    @Excel(name = "IP地址")
    private String ipAddress;

    /** 用户代理 */
    private String userAgent;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setKeyword(String keyword) 
    {
        this.keyword = keyword;
    }

    public String getKeyword() 
    {
        return keyword;
    }

    public void setResultCount(Integer resultCount) 
    {
        this.resultCount = resultCount;
    }

    public Integer getResultCount() 
    {
        return resultCount;
    }

    public void setSearchTime(Date searchTime) 
    {
        this.searchTime = searchTime;
    }

    public Date getSearchTime() 
    {
        return searchTime;
    }

    public void setIpAddress(String ipAddress) 
    {
        this.ipAddress = ipAddress;
    }

    public String getIpAddress() 
    {
        return ipAddress;
    }

    public void setUserAgent(String userAgent) 
    {
        this.userAgent = userAgent;
    }

    public String getUserAgent() 
    {
        return userAgent;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("keyword", getKeyword())
            .append("resultCount", getResultCount())
            .append("searchTime", getSearchTime())
            .append("ipAddress", getIpAddress())
            .append("userAgent", getUserAgent())
            .toString();
    }
}

